package cn.smxy.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

@Data
@TableName("category")
public class Category implements Serializable {
    private static final long serialVersionUID = -4878477409852936047L;

    @TableId(type = IdType.ASSIGN_ID,value = "category_id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long categoryId;

    @NotBlank
    private String categoryName;
}
